# This file contains data to control the operation of the 5790B firmware updater.
#
# The filename of this file must be "AuxInfo.txt" (case-sensitive).
#
# The name of the updater application is "update.flt".

SectionList
    Sequence     = SSLKey, Updater, Script, AppSplash, Licenses, MSP430, InguardFPGA, Inguard, Main
    #Sequence    = SSLKey, Updater, Script, AppSplash, NVFiles, Licenses, InguardFPGA, Inguard, Main
    #Sequence    = SSLKey, Updater, Script, AppSplash, NVFiles, MSP430, OutguardFPGA, InguardFPGA, Inguard, Main
    #Sequence    = InguardFPGA, Inguard
    #Sequence    = Inguard
    #Sequence    = MSP430
    #Sequence    = Main

	Script       = Script_Part1, Script_Part2
    #NVFiles     = NVFiles_Part1, NVFiles_Part2
    Licenses     = License_Part1, License_Part2, License_Part3
    SSLKey	     = SSLKey_Part1, SSLKey_Part2
    Updater      = Updater_Part1, Updater_Part2
    AppSplash    = AppSplash_Part1, AppSplash_Part2    
    OutguardFPGA = OutguardFPGA_Part1, OutguardFPGA_Part2, OutguardFPGA_Part3
    InguardFPGA  = InguardFPGA_Part1, InguardFPGA_Part2
    Inguard	     = Inguard_Part1, Inguard_Part2
    Main 	     = Main_Part1, Main_Part2
	MSP430		 = MSP430_Part1, MSP430_Part2, MSP430_Part3, MSP430_Part4
    Reboot       = Reboot_Part1

# In order to use the updater to update 5790B main firmware the following
# steps are required:
#
#	1. Obtain a USB memory stick.
#
#	2. Create a top-level directory named "firmware" on the memory stick.
#
#	3. Manually update the 'TimeStamp' and 'MD5Hash' parameter values in
#	   this file ("AuxInfo.txt") to be correct for the new firmware to
#	   be installed.
#
#	4. Copy the following 3 files to the "firmware" directory on the memory
#	   stick:
#
#		(1) lancer.flt   - this is the new 5790B firmware file
#		(2) update.flt   - this is the updater executable
#		(3) AuxInfo.txt  - this file
#
#	5. Plug the memory stick into the USB port on the front of the 5790B.
#
#	6. Execute the remote command:
#
#		dfu "update.flt"

Main_Part1
    Operation      = TransferFile
    SrcDir         = /mnt/firmware
    SrcFile        = vanquish-outguard
    InterimDir     = /home/Vanquish/tmp
    InterimFile    = vanquish-outguard
    DestDir        = /home/Vanquish/bin
    DestFile       = vanquish-outguard
    BackupDir      = /home/Vanquish/download
    BackupFile     = vanquish-outguard.bak
    TimeStamp      = 2019-08-28 08:19:12
    MD5Hash        = 116f6c98608e3b335f569d9d111ce3d1
    SHA256Hash     = 1f7a0c96c854f78469d429dec1a22e0afe5a43c9e4bce305b0471b11ff99e8ee
    NoUpdateSame   = true

Main_Part2
    Operation      = RemoveFiles
    file1          = /home/Vanquish/download/vanquish-outguard.bak
	
# Error Codes

# If an error occurs the updater ("update.flt") queues an error
# 1902 that will be displayed on the calibrator's front panel when
# it restarts.  The reported error includes one of the following
# error subcodes:

# 601    Backup directory not specified in aux info.
# 602    Backup filename not specified in aux info.
# 603    Destination directory not specified in aux info.
# 604    Destination filename not specified in aux info.
# 605    Error extracting required file transfer data from aux info.
# 606    Error retrieving parameter value from aux info.
# 607    Error retrieving section name from aux info.
# 608    Interim directory not specified in aux info.
# 609    Interim filename not specified in aux info.
# 610    Error reading aux info file.
# 611    Source directory on USB device not specified in aux info.
# 612    Source filename on USB device not specified in aux info.
# 613    Can't build a list of sequences to be executed.
# 614	 Backup directory not specified in AuxInfo file.
# 615	 Backup file not specified in AuxInfo file.
# 616	 Destination directory not specified in AuxInfo file.
# 617	 Destination file not specified in AuxInfo file.
# 618	 Source directory not specified in AuxInfo file.
# 619	 Source file not specified in AuxInfo file.
# 620    Error setting mode of new file.
# 621    Timestamp too long in aux info.
# 622    Can't close updated file.
# 623    Destination file does not exist.
# 624    Can't get required aux info parameters (SrcFile, SrcDir, DestDir, DestFile).
# 625    Can't open new file.
# 626    Failed to read the existing (destination) file.
# 627    Failed to read the new (source) file.
# 628    Can't remove existing backup file.
# 629    Can't rename existing file to backup file.
# 630    Source file does not exist.
# 631    Invalid timestamp.  Can't convert to epoch time.
# 632	 Kernel Datapath1 not specified in AuxInfo file.
# 633	 Kernel Datapath2 not specified in AuxInfo file.
# 634	 Kernel Device not specified in AuxInfo file.
# 635	 Kernel Erase Command not specified in AuxInfo file.
# 636	 Failed to extract data required for the flash update operation from the aux info.
# 637	 Kernel Offset not specified in AuxInfo file.
# 638	 Kernel Read Command not specified in AuxInfo file.
# 639	 Kernel Write Command not specified in AuxInfo file.
# 640	 Kernel Device failed to close.
# 641	 Kernel Device failed to return info about device status.
# 642	 Kernel Device failed to open.
# 643	 Kernel Device failed to return its status (this error is not used, you'll never see it).
# 644	 Unable to determine the size of the flash image file.
# 645    Invalid offset in flash image section. 
# 646    Unable to extract command1 from AuxInfo file for MSP430_Update_Part3
# 647    Unable to extract command1 from AuxInfo file for MSP430_Update_Part3 
# 648    Error creating interim directory.
# 649    MD5 hash of downloaded file does not agree with aux info.
# 650    Error mounting USB device.
# 651    File to be downloaded does not exist on USB device.
# 652    USB device not plugged in.
# 653    Error deleting previous backup file.
# 654    Error renaming installed file to backup.
# 655    Error moving download file to destination directory on A9.
# 656    Remove file operation not specified in AuxInfo file.
# 657    Remove file operation failed.
# 658    Error copying file from USB device to interim directory.
# 659    File on USB device is older than installed file.
# 660    File on USB device is the same as installed file (based on timestamp).
# 661    Error unmounting USB device.
# 662    Can't extract version number from line 1 of source file
# 663    Can't extract version number from line 1 of destination file
# 664	 Kernel Datapath1 MD5 hash failed.
# 665	 Kernel Datapath2 (readback) MD5 hash failed.
# 666	 Unable to extract command JTAG from AuxInfo for MSP.
# 667	 Unable to unlock JTAG on MSP.
# 668	 SSL check failed.
# 669    Command device length error
# 670    SHA256 hash of downloaded file does not agree with aux info.

#-------------------------------------------------------------------------------

Script_Part1
    Operation      = TransferFile
    SrcDir         = /mnt/firmware
    SrcFile        = vanquish
    InterimDir     = /home/Vanquish/tmp
    InterimFile    = vanquish
    DestDir        = /home/Vanquish/bin
    DestFile       = vanquish
    BackupDir      = /home/Vanquish/download
    BackupFile     = vanquish.bak
    TimeStamp      = 2019-04-08 04:01:02
    MD5Hash        = 4d1fa7599ccdac5ace098dffe9a22e1f
    SHA256Hash     = 93d0666f2ec17d0c2b5f779b73b294afa629db98300129d18791ac417d5f5d61
    DestNoExist    = true    
    NoUpdateSame   = true

Script_Part2
    Operation      = RemoveFiles
    file1          = /home/Vanquish/download/vanquish.bak

#-------------------------------------------------------------------------------
#
# NVFiles_Part1
#    Operation      = TransferFile
#    SrcDir         = /mnt/firmware
#    SrcFile        = Passwords.txt
#    InterimDir     = /home/Vanquish/tmp
#    InterimFile    = Passwords.txt
#    DestDir        = /home/Vanquish/nv
#    DestFile       = Passwords.txt
#    BackupDir      = /home/Vanquish/download
#    BackupFile     = Passwords.txt.bak
#    TimeStamp      = 2019-04-08 04:01:02
#    MD5Hash        = df71160742ff9ba2a553b0c5b1674db7
#    SHA256Hash     = 782e8687bc27cf3574f938b04a30e4d422bef44855f1cbcc595deab263d1393a
#    DestNoExist    = true
#    NoUpdateSame   = true
#    
# NVFiles_Part2
#    Operation      = RemoveFiles
#    file1          = /home/Vanquish/download/Passwords.txt.bak
#
#-------------------------------------------------------------------------------

License_Part1
    Operation      = TransferFile
    SrcDir         = /mnt/firmware
    SrcFile        = ARPHICPL.TXT
    InterimDir     = /usr/share/common-licenses
    InterimFile    = ARPHICPL.TXT
    DestDir        = /home/Vanquish/bin
    DestFile       = ARPHICPL.TXT
    BackupDir      = /home/Vanquish/download
    BackupFile     = ARPHICPL.TXT.bak
    TimeStamp      = 2019-04-08 04:01:02
    MD5Hash        = 4555ed88e9a72fc9562af379d07c3350
    SHA256Hash     = 3a5e90c0957524a89e48203febcd4492ca4393678abaa7e5b4d70f3ff32b386d
    DestNoExist    = true
    NoUpdateSame   = true

License_Part2
    Operation      = TransferFile
    SrcDir         = /mnt/firmware
    SrcFile        = ARPHICPL.TXT
    InterimDir     = /home/Vanquish/tmp
    InterimFile    = ARPHICPL.TXT
    DestDir        = /usr/share/common-licenses
    DestFile       = ARPHICPL.TXT
    BackupDir      = /home/Vanquish/download
    BackupFile     = ARPHICPL.TXT.bak
    TimeStamp      = 2019-04-08 04:01:02
    MD5Hash        = 4555ed88e9a72fc9562af379d07c3350
    SHA256Hash     = 3a5e90c0957524a89e48203febcd4492ca4393678abaa7e5b4d70f3ff32b386d
    DestNoExist    = true
    NoUpdateSame   = true
    
License_Part3
    Operation      = RemoveFiles
    file1          = /home/Vanquish/download/ARPHICPL.TXT.bak
    
#-------------------------------------------------------------------------------

SSLKey_Part1
    Operation      = TransferFile
    SrcDir         = /mnt/firmware
    SrcFile        = FlukeCal.pub
    InterimDir     = /home/Vanquish/tmp
    InterimFile    = FlukeCal.pub
    DestDir        = /home/Vanquish/bin
    DestFile       = FlukeCal.pub
    BackupDir      = /home/Vanquish/download
    BackupFile     = FlukeCal.pub.bak
    TimeStamp      = 2019-04-08 04:01:02
    MD5Hash        = 1574fd27eca57859f7eab09dd1e14989
    SHA256Hash     = eb763c638ae2180d9269d88a2680a35784548932d3904910dee0c9eeb6de6edc
    DestNoExist    = true
    NoUpdateSame   = true

SSLKey_Part2
    Operation      = RemoveFiles
    file1          = /home/Vanquish/download/FlukeCal.pub.bak


#-------------------------------------------------------------------------------
 
Updater_Part1
    Operation      = TransferFile
    SrcDir         = /mnt/firmware
    SrcFile        = update
    InterimDir     = /home/Vanquish/tmp
    InterimFile    = update
    DestDir        = /home/Vanquish/bin
    DestFile       = update
    BackupDir      = /home/Vanquish/download
    BackupFile     = update.bak
    TimeStamp      = 2019-08-28 08:17:44
    MD5Hash        = afcd75aa1493bc3f59e4a3ccab63d629
    SHA256Hash     = 1df1424656b1bcb3a6d39235a065b9032be0d1c9a2535fe1d05cce8bbb8c7ae1
    DestNoExist    = true
    NoUpdateSame   = true
               
Updater_Part2
    Operation      = RemoveFiles
    file1          = /home/Vanquish/download/update.bak


#-------------------------------------------------------------------------------
 
AppSplash_Part1
    Operation      = TransferFile
    SrcDir         = /mnt/firmware
    SrcFile        = qsplash
    InterimDir     = /home/Vanquish/tmp
    InterimFile    = qsplash
    DestDir        = /home/Vanquish/bin
    DestFile       = qsplash
    BackupDir      = /home/Vanquish/download
    BackupFile     = qsplash.bak
    TimeStamp      = 2019-08-28 08:17:45
    MD5Hash        = 302f1cff64fdb7e91c421bd76d422fdf
    SHA256Hash     = c8b60f50f346808fb857cb32fdadbe4cc5a364b56df218ca9e4fb261cee91309
    DestNoExist    = true
    NoUpdateSame   = true
   
AppSplash_Part2
    Operation      = RemoveFiles
    file1          = /home/Vanquish/download/qsplash.bak

#-------------------------------------------------------------------------------

InguardFPGA_Part1
    Operation      = TransferFile
    SrcDir         = /mnt/firmware
    SrcFile        = vanquish-inguard-fpga.hexout
    InterimDir     = /home/Vanquish/tmp
    InterimFile    = vanquish-inguard-fpga.hexout
    DestDir        = /home/Vanquish/download
    DestFile       = vanquish-inguard-fpga.hexout
    BackupDir      = /home/Vanquish/download
    BackupFile     = vanquish-inguard-fpga.hexout.bak
    TimeStamp      = 2019-04-08 04:01:02
    MD5Hash        = b08fe048170ac5d737742d4d2fa1ee0e
    SHA256Hash     = 17c64d0f416baa643a1536343359773ed8eaa88ed9185cab63542152328b771c
    DestNoExist    = true

InguardFPGA_Part2
    Operation      = RemoveFiles
    file1          = /home/Vanquish/download/vanquish-inguard-fpga.hexout.bak
	
#-------------------------------------------------------------------------------

Inguard_Part1
    Operation      = TransferFile
    SrcDir         = /mnt/firmware
    SrcFile        = vanquish-inguard.ldr
    InterimDir     = /home/Vanquish/tmp
    InterimFile    = vanquish-inguard.ldr
    DestDir        = /home/Vanquish/download
    DestFile       = vanquish-inguard.ldr
    BackupDir      = /home/Vanquish/download
    BackupFile     = vanquish-inguard.ldr.bak
    TimeStamp      = 2019-07-29 04:39:32
    MD5Hash        = cdb03e8f311e97a88dc779322f6bcf12
    SHA256Hash     = 62e6535a67713aef8cde32764035b737da7e642d5d3ac0ce6d93b4756b6b4a58
    DestNoExist    = true

Inguard_Part2
    Operation      = RemoveFiles
    file1          = /home/Vanquish/download/vanquish-inguard.ldr.bak

#-------------------------------------------------------------------------------

MSP430_Part1
    Operation      = TransferFile
    SrcDir         = /mnt/firmware
    SrcFile        = bsl
    InterimDir     = /home/Vanquish/bin/tmp
    InterimFile    = bsl
    DestDir        = /home/Vanquish/bin
    DestFile       = bsl
    BackupDir      = /home/Vanquish/download
    BackupFile     = bsl.bak
    TimeStamp      = 2019-08-28 08:17:44
    MD5Hash        = 16b0d912e62cb7f6b7bf92d135aa3d98
    SHA256Hash     = 9df5ac6873610ed98d315baa2fafd1516ad5b3a974034121b5c606bf3542b734
    DestNoExist    = true
    NoUpdateSame   = true

MSP430_Part2
    Operation      = TransferFile
    SrcDir         = /mnt/firmware
    SrcFile        = Keyscan.txt
    InterimDir     = /home/Vanquish/bin/tmp
    InterimFile    = Keyscan.txt
    DestDir        = /home/Vanquish/download
    DestFile       = Keyscan.txt
    BackupDir      = /home/Vanquish/download
    BackupFile     = Keyscan.txt.bak
    TimeStamp      = 2019-04-08 04:01:02
    MD5Hash        = a7814bd417d19bf5e90dd198b3dbb92a
    SHA256Hash     = 6642ba8d2a423d49746f73796ae85b419013751722589e3aa0228dd68b3f30d4
    DestNoExist    = true

MSP430_Part3
    Operation      = MSP430Update
    CommandJTAG    = /home/Vanquish/bin/bsl -j
    Command1       = /home/Vanquish/bin/bsl -s5 /home/Vanquish/download/Keyscan.txt

MSP430_Part4
    Operation      = RemoveFiles
    file1          = /home/Vanquish/bin/bsl
    file2          = /home/Vanquish/bin/bsl.bak
    file3          = /home/Vanquish/download/Keyscan.txt
    file4          = /home/Vanquish/download/Keyscan.txt.bak	

#-------------------------------------------------------------------------------

OutguardFPGA_Part1
    Operation      = TransferFile
    SrcDir         = /mnt/firmware
    SrcFile        = vanquish-outguard-fpga.rbf
    InterimDir     = /usr/bin/tmp
    InterimFile    = vanquish-outguard-fpga.rbf
    DestDir        = /home/Vanquish/download
    DestFile       = vanquish-outguard-fpga.rbf
    BackupDir      = /home/Vanquish/download
    BackupFile     = vanquish-outguard-fpga.rbf.bak
    TimeStamp      = 2019-04-08 04:01:02
    MD5Hash        = 0af536897fa071a0872676567bc81fd0
    SHA256Hash     = 4704977f74124e62302ab1da8cce7a233b98f90528e4e55e195d3bfa1cab24e1
    DestNoExist    = true

OutguardFPGA_Part2
    Operation      = FlashUpdate
    Device         = /dev/mtd1
    Offset         = 0
    EraseCommand   = /usr/sbin/flash_erase
    WriteCommand   = /usr/sbin/flashcp
    DataPath1      = /home/Vanquish/download/vanquish-outguard-fpga.rbf

OutguardFPGA_Part3
    Operation      = RemoveFiles
    file1          = /home/Vanquish/download/vanquish-outguard-fpga.rbf.bak

#-------------------------------------------------------------------------------
	
Reboot_Part1
    Operation   = Reboot

#-------------------------------------------------------------------------------

